import Vue from 'vue'
import store from '@/store'

Vue.directive('permission', function (el, binding) {
  // binding.value是表达式的值
  if (store.state.user.buttons.indexOf(binding.value) === -1) {
    el.style.display = 'none'
  }
})
